package com.black.platform.permission.service.handler;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.black.common.web.PageQuery;
import com.black.platform.permission.po.Permission;
import com.black.platform.permission.vo.PermissionTreeVo;
import com.black.common.vo.PermissionVo;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author linwenfeng
 */
public interface PermissionHandlerService {

    IPage<Permission> search(PageQuery<Permission> searchVo);

    Permission getById(Long id);

    boolean saveOrUpdate(Permission permission);

    boolean removeByIds(List<Long> ids);

    Map<String, List<PermissionTreeVo>> getPermissionTree(String systemCode);

    List<PermissionVo> getAllPermissionsByUser(String systemCode, boolean isIncludeInvalid);

    List<PermissionVo> getAllDataPermissionsByUser(String systemCode);

    List<String> getUserButtonPermissionsByUserId(String systemCode, boolean isIncludeInvalid);

    Map<String, Set<Long>> getAllRouterPermissions();

    Set<String> getAllWhitePath();
}
